﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orid.Management.Statistics.Tools.Decomposition.Model;
using Orid.Data.SqlServer;

using System.Data.SqlClient;


namespace Orid.Management.Statistics.Tools.Decomposition.Data
{
    class ParentDataOffline : ParentData
    {
        public override List<ModelParentObject> GetParentDatas(Guid OrderId)
        {
           

            try
            {

                if (OrderId == null)
                {
                    return null;
                }
                List<ModelParentObject> listParentData = new List<ModelParentObject>();


                string connectString = Config.Setting.SettingInstance.DBAddress_Offline;
                //[ParentObject]
                string tableName = Config.Setting.SettingInstance.ParentDatas_Offline;

                listParentData = GetParentDatas(OrderId, connectString, tableName);

                return listParentData;
            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                throw (new Exception(ex.Message));
            }

            
        }
    }
}
